# $Id: PKGBUILD 72886 2012-06-24 13:16:21Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Tor Krill <tor@krill.nu>

pkgname=nautilus-actions
pkgver=3.2.2
pkgrel=2
pkgdesc="Configures programs to be launched when files are selected in Nautilus"
arch=('i686' 'x86_64')
url="http://www.nautilus-actions.org/"
license=('GPL')
depends=('nautilus' 'libunique3' 'libgtop' 'gconf' 'libsm')
makedepends=('intltool' 'gnome-doc-utils')
install=nautilus-actions.install
options=('!libtool')
source=(http://ftp.gnome.org/pub/GNOME/sources/nautilus-actions/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
sha256sums=('214af9fd2a7f561366bf88446f9b79182e696a303da8e15c7a8a1ffaeaca11c4')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib \
              --disable-schemas-install \
              --with-gconf-schema-file-dir=/usr/share/gconf/schemas
  make
}

package(){
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  # Install GConf schemas
  mkdir -p "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" --domain nautilus-actions \
                     "$pkgdir"/usr/share/nautilus-actions/gconf-schemas/*.schemas
  rm -r "$pkgdir/usr/share/nautilus-actions/gconf-schemas/"

  # Remove redundant documentation
  rm -r "$pkgdir/usr/share/doc/"
}
